package com.myproject.mall.common.constants;

public final class RedisConstants {
    /**
     * 用户验证码前缀, 格式为 user:code:phone, 存储code, 验证码有效期5分钟
     */
    public static final String USER_CODE_PREFIX = "user:code:";
    public static final Long USER_CODE_EXPIRE = 5L;

    /**
     * 用户token前缀, 格式是 user:token:token，存储token对应用户信息, token有效期30分钟
     */
    public static final String USER_TOKEN_PREFIX = "user:token:";
    public static final Long USER_TOKEN_EXPIRE = 30L;

    public static final String USER_COLLECTION_PREFIX = "user:collection:";
    public static final Long USER_COLLECTION_EXPIRE = 30L;

    public static final String USER_FOLLOW_PREFIX = "user:follow:";

    /**
     * 用户浏览记录, 30天
     */
    public static final String USER_HISTORY_PREFIX = "user:history:";
    public static final Long USER_HISTORY_EXPIRE = 30L * 24 * 60;

    public static final String USER_BLOOM_KEY = "bloom:user:phone";

    public static final String LOCK_PREFIX = "lock:";

    public static final String ORDER_TEMP_PREFIX = "order:temp:";
    public static final Long ORDER_TEMP_EXPIRE = 30L;
    public static final String LOGIC_EXPIRE_KEY = "logicExpire";

    public static final String BRAND_KEY = "brand";

    public static final String GOODS_HOT_KEY = "goods:hot";
    public static final Long GOODS_HOT_EXPIRE = 60 * 24 * 7L;
}
